﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace AsteriskAPI
{
    public class AsteriskResponse
    {
        public readonly EventWaitHandle WaitHandle;
        public readonly string ActionID;
        public readonly DateTime CreatedDateTime;
        public readonly bool ReturnControlOnResponse;
        public bool? Success;
        public string Message;
        public List<AsteriskEventArgs> RelatedEvents = new List<AsteriskEventArgs>();

        public AsteriskResponse(EventWaitHandle waitHandle, string actionID) : this(waitHandle, actionID, true) { }
        public AsteriskResponse(EventWaitHandle waitHandle, string actionID, bool returnControlOnResponse)
        {
            this.WaitHandle = waitHandle;
            this.ActionID = actionID;
            this.CreatedDateTime = DateTime.Now;
            this.ReturnControlOnResponse = returnControlOnResponse;
        }
    }
}
